import type { MockMethod } from 'vite-plugin-mock';
import config from '../../_config';

export default [
	// licence
	{
		url: '/user/getUserByConditions',
		method: 'post',
		timeout: config.timeout,
		response: ({ query, body }) => {
			return {
				code: config.resultCode,
				message: 'success',
				results: config.pageData({
					data: [
						{
							id: 9,
							loginName: 'laoliu',
							password: 'e10adc3949ba59abbe56e057f20f883e',
							oldPassword: null,
							userName: '老六',
							qq: null,
							email: '17777777777@163.com',
							gender: null,
							phone: '17777777777',
							status: 0,
							userType: null,
							enterpriseId: null,
							createUserId: 1,
							createDate: 1683787981913,
							modifyUserId: null,
							modifyDate: null,
							type: 'normal',
							stationCodes: null,
							stationCode: null,
							userId: null,
							loginUserPassword: null,
							roleList: null,
							stationList: null,
							roleName: null,
							roleIds: null,
							roles: [
								{
									id: 5,
									authorizeMs: null,
									name: '角色名称2',
									description: '',
									roleType: 'normal',
									status: 0,
									enterpriseId: null,
									createUserId: 1,
									createDate: 1679032219264,
									modifyUserId: 1,
									modifyDate: 1683788630115,
									authIds: null,
									createUserName: null,
								},
							],
							authIds: null,
							domainName: null,
							pageNum: null,
							pageSize: null,
							departmentId: null,
							description: '',
						},
						{
							id: 8,
							loginName: 'wangmazi',
							password: 'e10adc3949ba59abbe56e057f20f883e',
							oldPassword: null,
							userName: '王麻子',
							qq: null,
							email: '18888888888@gmail.com',
							gender: null,
							phone: '18888888888',
							status: 0,
							userType: null,
							enterpriseId: null,
							createUserId: 1,
							createDate: 1683787699144,
							modifyUserId: null,
							modifyDate: null,
							type: 'normal',
							stationCodes: null,
							stationCode: null,
							userId: null,
							loginUserPassword: null,
							roleList: null,
							stationList: null,
							roleName: null,
							roleIds: null,
							roles: [
								{
									id: 4,
									authorizeMs: null,
									name: '角色名称1',
									description: '',
									roleType: 'normal',
									status: 0,
									enterpriseId: null,
									createUserId: 1,
									createDate: 1679031844421,
									modifyUserId: 1,
									modifyDate: 1683788070307,
									authIds: null,
									createUserName: null,
								},
							],
							authIds: null,
							domainName: null,
							pageNum: null,
							pageSize: null,
							departmentId: null,
							description: '',
						},
						{
							id: 3,
							loginName: 'lisi',
							password: 'e10adc3949ba59abbe56e057f20f883e',
							oldPassword: null,
							userName: '李四',
							qq: null,
							email: '7777777@qq.com',
							gender: null,
							phone: '17777777777',
							status: 0,
							userType: null,
							enterpriseId: null,
							createUserId: 1,
							createDate: 1679032930336,
							modifyUserId: null,
							modifyDate: null,
							type: 'normal',
							stationCodes: null,
							stationCode: null,
							userId: null,
							loginUserPassword: null,
							roleList: null,
							stationList: null,
							roleName: null,
							roleIds: null,
							roles: [
								{
									id: 4,
									authorizeMs: null,
									name: '角色名称1',
									description: '',
									roleType: 'normal',
									status: 0,
									enterpriseId: null,
									createUserId: 1,
									createDate: 1679031844421,
									modifyUserId: 1,
									modifyDate: 1683788070307,
									authIds: null,
									createUserName: null,
								},
								{
									id: 5,
									authorizeMs: null,
									name: '角色名称2',
									description: '',
									roleType: 'normal',
									status: 0,
									enterpriseId: null,
									createUserId: 1,
									createDate: 1679032219264,
									modifyUserId: 1,
									modifyDate: 1683788630115,
									authIds: null,
									createUserName: null,
								},
							],
							authIds: null,
							domainName: null,
							pageNum: null,
							pageSize: null,
							departmentId: null,
							description: '',
						},
						{
							id: 2,
							loginName: 'zhangsan',
							password: 'e10adc3949ba59abbe56e057f20f883e',
							oldPassword: null,
							userName: '张三',
							qq: null,
							email: '88888888@qq.com',
							gender: null,
							phone: '18888888888',
							status: 0,
							userType: null,
							enterpriseId: null,
							createUserId: 1,
							createDate: 1679032598547,
							modifyUserId: null,
							modifyDate: null,
							type: 'normal',
							stationCodes: null,
							stationCode: null,
							userId: null,
							loginUserPassword: null,
							roleList: null,
							stationList: null,
							roleName: null,
							roleIds: null,
							roles: [
								{
									id: 4,
									authorizeMs: null,
									name: '角色名称1',
									description: '',
									roleType: 'normal',
									status: 0,
									enterpriseId: null,
									createUserId: 1,
									createDate: 1679031844421,
									modifyUserId: 1,
									modifyDate: 1683788070307,
									authIds: null,
									createUserName: null,
								},
							],
							authIds: null,
							domainName: null,
							pageNum: null,
							pageSize: null,
							departmentId: null,
							description: '',
						},
					],
				}),
			};
		},
	},
	{
		url: '/user/updateUser',
		method: 'post',
		timeout: config.timeout,
		response: ({ query, body }) => {
			return {
				code: config.resultCode,
				message: 'success',
				results: null,
			};
		},
	},
	{
		url: '/user/insertUser',
		method: 'post',
		timeout: config.timeout,
		response: ({ query, body }) => {
			return {
				code: config.resultCode,
				message: 'success',
				results: null,
			};
		},
	},
	{
		url: '/user/updateUserMStatus',
		method: 'post',
		timeout: config.timeout,
		response: ({ query, body }) => {
			return {
				code: config.resultCode,
				message: 'success',
				results: null,
			};
		},
	},
	{
		url: '/user/deleteUserById',
		method: 'post',
		timeout: config.timeout,
		response: ({ query, body }) => {
			return {
				code: config.resultCode,
				message: 'success',
				results: null,
			};
		},
	},
] as MockMethod[];
